Define TARGET_PREFIX to use with grub2 deployment
authorAnton Gerasimov <anton@advancedtelematic.com>
Mon, 27 Mar 2017 14:05:46 +0000 (16:05 +0200)
committerAtomic Bot <atomic-devel@projectatomic.io>
Mon, 27 Mar 2017 15:49:50 +0000 (15:49 +0000)
Closes: #760
Approved by: cgwalters

Makefile.am
src/libostree/ostree-bootloader-grub2.c

index cc0e76f5fe4d777e96cbd88beba1f410746e73ce..78cd66530aeec78f9fe98be0ce42f761ec6be8c2 100644 (file)
@@ -24,7 +24,7 @@ OSTREE_GITREV=$(shell if command -v git >/dev/null 2>&1 && test -d $(srcdir)/.gi
 ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS}
 AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
        -DLOCALEDIR=\"$(datadir)/locale\" -DSYSCONFDIR=\"$(sysconfdir)\" \
-       -DSHORTENED_SYSCONFDIR=\"$(shortened_sysconfdir)\" \
+       -DTARGET_PREFIX='"$(prefix)"' -DSHORTENED_SYSCONFDIR=\"$(shortened_sysconfdir)\" \
        -DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' \
        -DOSTREE_COMPILATION \
        -DG_LOG_DOMAIN=\"OSTree\" \
index 6f245fb7960220331f797dddefc408259f3f7a61..2cd0228708440c0ec2c574fbe22778c35191878e 100644 (file)
@@ -353,7 +353,7 @@ _ostree_bootloader_grub2_write_config (OstreeBootloader      *bootloader,
         use_system_grub2_mkconfig = FALSE;
     }
   else
-    grub_exec = use_system_grub2_mkconfig ? GRUB2_MKCONFIG_PATH : "/usr/lib/ostree/ostree-grub-generator";
+    grub_exec = use_system_grub2_mkconfig ? GRUB2_MKCONFIG_PATH : TARGET_PREFIX "/lib/ostree/ostree-grub-generator";
 
   if (use_system_grub2_mkconfig && ostree_sysroot_get_booted_deployment (self->sysroot) == NULL
       && g_file_has_parent (self->sysroot->path, NULL))